//
//  Message.m
//  YouthOlympic2014
//
//  Created by xiangpaopao on 14-7-1.
//  Copyright (c) 2014年 mitian. All rights reserved.
//

#import "Message.h"


@implementation Message
@synthesize cid,id,title,content,dateStr,date,isRead;

- (Message*) instance:(NSString*) str{
    Message* msg = [[Message alloc]init];
    
    NSArray* dataArr = [str componentsSeparatedByString:@"=="];
    if (dataArr.count != 8) {
        return nil;
    }
    
    msg.title = dataArr[1];
    msg.isRead = FALSE;
    msg.content = dataArr[6];
    msg.dateStr = dataArr[7];
    //
    return msg;
}
@end
